Skip to content

Fix deprecation warnings in PhotonLib examples#1699

Merged
mcm001 merged 8 commits intoPhotonVision:mainfrom
DeltaDizzy:fix-photonlib-examples
Jan 12, 2025
Merged

Fix deprecation warnings in PhotonLib examples#1699
mcm001 merged 8 commits intoPhotonVision:mainfrom
DeltaDizzy:fix-photonlib-examples

Conversation

@DeltaDizzy
Copy link
Contributor

@DeltaDizzy DeltaDizzy commented Jan 10, 2025

The following deprecation warnings have been fixed:

  • SwerveModuleState.optimize(desiredState, currentRotation);, which is now an instance method
  • AprilTagFields.kDefaultField.loadAprilTagLayoutField();, which is now AprilTagFieldLayout.loadField(AprilTagFields.kDefaultField);

WIP:

  • C++
  • Python

@DeltaDizzy DeltaDizzy marked this pull request as ready for review January 10, 2025 19:14
@DeltaDizzy DeltaDizzy requested review from a team as code owners January 10, 2025 19:14
@mcm001
Copy link
Contributor

mcm001 commented Jan 10, 2025

  • Are there any ignore depreciateds floating around C++, too?

@DeltaDizzy
Copy link
Contributor Author

  • Are there any ignore depreciateds floating around C++, too?

Only in photon-lib itself from a quick search (VisionSystemSimTest.cpp L37)

Copy link
Contributor

@mcm001 mcm001 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems reasonable

@mcm001 mcm001 merged commit d487e1c into PhotonVision:main Jan 12, 2025
@DeltaDizzy DeltaDizzy deleted the fix-photonlib-examples branch January 15, 2025 23:40
mcm001 pushed a commit to mcm001/photonvision that referenced this pull request Feb 18, 2025
The following deprecation warnings have been fixed:
- `SwerveModuleState.optimize(desiredState, currentRotation);`, which is
now an instance method
- `AprilTagFields.kDefaultField.loadAprilTagLayoutField();`, which is
now `AprilTagFieldLayout.loadField(AprilTagFields.kDefaultField);`

WIP:
- [x] C++
- [x] Python
@Gold856 Gold856 added the photonlib Things related to the PhotonVision library label Jul 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

photonlib Things related to the PhotonVision library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants